﻿<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>NxBRE - Pseudo-code rendering</title>
    <style type="text/css">
					@media screen { a[href]:hover { background: #ffa } }
					font.standard { font-family: courier; color: black; font-size: 12px }
					font.constant { font-family: courier; font-weight: bold; color: black; font-size: 12px }
					font.type { font-family: courier; color: red; font-size: 12px }
					font.privatetype { font-family: courier; font-weight: bold; color: navy; background:Lavender ; font-size: 12px }
					font.keyword { font-family: courier; font-weight: bold; color: blue; font-size: 12px }
					font.keyword2 { font-family: courier; font-weight: bold; color: cadetblue; font-size: 12px }
					font.keyword3 { font-family: courier; color: maroon; font-size: 12px }
					font.id { font-family: courier; font-weight: bold; color: navy; font-size: 12px }
					font.comment { font-family: courier; font-style: italic; color: green; font-size: 12px }
					font.structure { font-family: courier; color: green; font-size: 12px }
					font.value { font-family: courier; color: navy; font-size: 12px }
					font.string { font-family: courier; color: magenta; font-size: 12px }
				</style>
  </head>
  <body bgcolor="white">
    <font class="standard">
      <a name="RULES_TOP">
      </a>
      <font class="comment">/* <br>

		NxBRE v.2.0 Unit Test File

<br> */</font>
      <br>
      <font class="comment">/* <br> 
		These rules will execute, no matter what.
		Their values will be used in the business logic below
		
		They instantiate simple value objects. See in the REFLECTION demo rule set below for more complex object instantiation.
		
		Assert is the generic statement, where type should be :
			- Exception | Boolean | Byte | Short | Integer | Long | Single | Double | Decimal | Date  | DateTime  | Time | String
			- or should be a fully qualified class name (with optionaly the assembly name after a coma).
	<br> */</font>
      <br>
      <font class="type">object</font> 5i<font class="structure"> = </font><font class="keyword2">new </font><font class="type">integer</font><font class="structure">(</font><font class="value">5</font><font class="structure">)</font><font class="structure">;</font><br><font class="type">object</font> xmas2003_A<font class="structure"> = </font><font class="keyword2">new </font><font class="type">date</font><font class="structure">(</font><font class="value">#2003-12-25#</font><font class="structure">)</font><font class="structure">;</font><br><font class="type">object</font> manOnMoon_A<font class="structure"> = </font><font class="keyword2">new </font><font class="type">datetime</font><font class="structure">(</font><font class="value">#1969-07-21T02:56:00#</font><font class="structure">)</font><font class="structure">;</font><br><font class="type">object</font> wakeUpCall_A<font class="structure"> = </font><font class="keyword2">new </font><font class="type">time</font><font class="structure">(</font><font class="value">#07:15:30#</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
		Assert is derived in specific tags where the type is used as tag name.
	<br> */</font><br><font class="type">boolean</font> TRUE<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br><font class="type">byte</font> 8b<font class="structure"> = </font><font class="value">8</font><font class="structure">;</font><br><font class="type">date</font> xmas2003<font class="structure"> = </font><font class="value">#2003-12-25#</font><font class="structure">;</font><br><font class="type">datetime</font> manOnMoon<font class="structure"> = </font><font class="value">#1969-07-21T02:56:00#</font><font class="structure">;</font><br><font class="type">time</font> wakeUpCall<font class="structure"> = </font><font class="value">#07:15:30#</font><font class="structure">;</font><br><font class="type">decimal</font> 3.14m<font class="structure"> = </font><font class="value">3.14</font><font class="structure">;</font><br><font class="type">double</font> 3.14d<font class="structure"> = </font><font class="value">3.14</font><font class="structure">;</font><br><font class="type">integer</font> ZERO<font class="structure"> = </font><font class="value">0</font><font class="structure">;</font><br><font class="type">integer</font> 10i<font class="structure"> = </font><font class="value">10</font><font class="structure">;</font><br><font class="type">short</font> 16s<font class="structure"> = </font><font class="value">16</font><font class="structure">;</font><br><font class="type">single</font> 3.14<font class="structure"> = </font><font class="value">3.14</font><font class="structure">;</font><br><font class="type">string</font> hello<font class="structure"> = </font><font class="string">"world"</font><font class="structure">;</font><br><font class="comment">/* <br>
		The following are short boolean syntax for CONSTANTS.
	<br> */</font><br><font class="keyword3">constant </font><font class="type">boolean </font>STORED_FALSE<font class="structure"> = </font><font class="value">false</font><font class="structure">;</font><br><font class="comment">/* <br>
		We can not modify the value of such a boolean - Modify will be ignored.
	<br> */</font><br><font class="keyword3">constant </font><font class="type">boolean </font>STORED_TRUE<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br>STORED_TRUE = <font class="keyword2">new </font><font class="type">boolean</font><font class="structure">(</font><font class="value">false</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
		Basic test that is always executed
	<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>STORED_TRUE<font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(not (</font>STORED_FALSE<font class="structure">))</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>RT1<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"RT1"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
		Tests	: This to check that globals are correctly processed
	<br> */</font><br><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">GlobalCounter</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
		Tests	: Set test
		Notes	: None
		Result	: This will not fire to prove that this set gets skipped..
	<br> */</font><br><a name="SET_BROKENSET"><font class="keyword">set </font><font class="id">BROKENSET</font></a><font class="structure"> {</font><ul><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"BROKENSET unexpectidly running"</font><font class="structure">);</font><br><font class="keyword3">constant </font><font class="type">boolean </font>BROKENSET<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure"> }</font><br><br><font class="comment">/* <br>
		Tests	: Set test
		Notes	: None
		Result	: Should execute..
	<br> */</font><br><a name="SET_WORKINGSET"><font class="keyword">set </font><font class="id">WORKINGSET</font></a><font class="structure"> {</font><ul><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"WORKINGSET running"</font><font class="structure">);</font><br><font class="keyword3">constant </font><font class="type">boolean </font>WORKINGSET<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: Dynamic Log
			Notes	: 
			Result	: Sends a log event with a message equals to the ToString() of an asserted object.
		<br> */</font><br><font class="keyword2">log</font><font class="structure">(</font><font class="value">3</font><font class="structure">, </font>hello<font class="structure">);</font><br><font class="comment">/* <br>
			Tests	: Exceptions 1
			Notes	: The rule engine simply pass the exception to the handler and does not break on exception raised in the rules file
					( See later for an example of fatal exception)
			Result	: Immediatly throws an exceptions with a default message.
		<br> */</font><br><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREException</font>()<font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: Exceptions 2
			Notes	: None
			Result	: Immediatly throws an exception and stores the exception object in the rules context under a specific id
		<br> */</font><br><font class="id">BREException</font> EXCP = <font class="keyword2"> new </font><font class="id">BREException</font>(<font class="string">"This is another exception!"</font>)<font class="structure">;</font><br><font class="keyword2">throw </font>EXCP<font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: Exceptions 3
			Notes	: None
			Result	: Immediatly throws an exception with a message equals to the ToString() of an asserted object.
		<br> */</font><br><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREException</font>(hello)<font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: While loop test 1
			Notes	: An increment is by default initialized at 0
			Result	: Should go 9 * 4 times (while ++INC_X &lt; 10 (while ++INC_Y &lt; 5 ))
		<br> */</font><br><br><font class="keyword">while </font><font class="structure">(</font><font class="structure">(</font>INC_X<font class="structure">++</font><font class="structure">)</font><font class="structure"> &lt; </font>10i<font class="structure">)</font><br><font class="structure">{</font><ul><br><font class="keyword">while </font><font class="structure">(</font><font class="structure">(</font>INC_Y<font class="structure">++</font><font class="structure">)</font><font class="structure"> &lt; </font>5i<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">WhileCounter</font><font class="structure">)</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br> Set the incrementor value to 0. Another syntax would have been value="0" instead of ruleValue - see below for example <br> */</font><br>INC_Y<font class="structure"> = </font>ZERO<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: While loop test 2
			Notes   : This test has been added to help pinpoint bug 870783
			Result	: Should not go because the previous while loop left the incrementor above the upper bound
		<br> */</font><br><br><font class="keyword">while </font><font class="structure">(</font><font class="structure">(</font>INC_X<font class="structure">++</font><font class="structure">)</font><font class="structure"> &lt; </font>10i<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"WLT2"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: While loop test 3
			Notes   : 
			Result	: After reseting INC_X to 6, the test should go 3 times
		<br> */</font><br>INC_X<font class="structure"> = </font><font class="value">6</font><font class="structure">;</font><br><br><font class="keyword">while </font><font class="structure">(</font><font class="structure">(</font>INC_X<font class="structure">++</font><font class="structure">)</font><font class="structure"> &lt; </font>10i<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">WhileCounter</font><font class="structure">)</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: ForEach test 1
			Notes   : ForEach interates on enumerable objects.
			Result	: Calls the delegates bound to "ForEachTester", which checks that the asserted "Parser" object is correct
					  The first evaluation is needed to load up the result of the call to GetEnumerable delegate into the context
		<br> */</font><br><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">GetEnumerable</font><font class="structure">)</font><font class="structure">;</font><br><br><font class="keyword">foreach</font><font class="structure">(</font><font class="id">ForEachParser</font><font class="keyword"> in </font><font class="id">GetEnumerable</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">ForEachTester</font><font class="structure">)</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: If a parameter can get to a value from another rule
			Result	: Should display "It worked"
		<br> */</font><br><br><font class="comment">/* <br> this actually takes the value from the rule with and ID of STORED_TRUE <br> */</font><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font><font class="keyword3">constant </font><font class="type">boolean </font>T1<font class="structure"> = </font><font class="value">true</font><font class="structure">)</font><font class="structure"> == </font><font class="structure">(</font><font class="type">object</font> V1<font class="structure"> = </font>STORED_TRUE<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>RT2<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"RT2"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Delegation to programmatic rules test
			Result	: Should go while the compare is TRUE
		<br> */</font><br><br><font class="comment">/* <br> must perform an evaluation to ensure custom code is called before evaluation <br> */</font><br><font class="comment">/* <br> it is up to mulBy5i to cast the parameter from String to Integer <br> */</font><br><font class="comment">/* <br> this time, we pass the value of an asserted integer <br> */</font><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font><font class="structure">(</font><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">50i</font><font class="structure">)</font><font class="structure">)</font><font class="structure"> == </font><font class="structure">(</font><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">mulBy5i</font><font class="structure">(</font>myParam<font class="structure"> = </font><font class="string">"10"</font><font class="structure">)</font><font class="structure">)</font><font class="structure">)</font><font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font><font class="structure">(</font><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">50i</font><font class="structure">)</font><font class="structure">)</font><font class="structure"> == </font><font class="structure">(</font><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">mulBy5i</font><font class="structure">(</font>myParam<font class="structure"> = </font>10i<font class="structure">)</font><font class="structure">)</font><font class="structure">)</font><font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>RT3<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"RT3"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br> 
			Tests	: If two booleans are equal.
			Notes	: Rules are executed at time of compare
			Result	: Should be TRUE since both are equal to TRUE
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font><font class="type">boolean</font> VALUE1<font class="structure"> = </font><font class="value">true</font><font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT1<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT1"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br> 
			Tests	: If two booleans are not equal.
			Notes	: Uses two preloaded rules, modified the parameters of one of them
			Result	: Should be true since VALUE1 is modified to FALSE
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(not (</font><font class="structure">(</font>VALUE1 = <font class="keyword2">new </font><font class="type">boolean</font><font class="structure">(</font><font class="value">false</font><font class="structure">)</font><font class="structure">)</font><font class="structure">))</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT2<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT2"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: If two booleans are equal.
			Notes	: Uses two preloaded, not Rule tag (to check issue resolution with v1.0.2)
			Result	: Should be false since VALUE1 was modified to FALSE in the above 
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font>STORED_TRUE<font class="structure"> == </font>VALUE1<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT3"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT3<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Condition And
			Notes	: Uses preloaded Rules
			Result	: Should be FALSE since TRUE does not equals VALUE1
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>TRUE<font class="structure"> != </font>VALUE1<font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font>TRUE<font class="structure"> == </font>VALUE1<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT4"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT4<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Condition Or
			Notes	: Uses preloaded Rules
			Result	: Should be TRUE because TRUE equals VALUE1
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>TRUE<font class="structure"> != </font>VALUE1<font class="structure">)</font><font class="structure"><br>or </font><font class="structure">(</font>TRUE<font class="structure"> == </font>VALUE1<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT5<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT5"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Condition And
			Notes	: Uses preloaded Rules
			Result	: Should be TRUE since FALSE1 equals VALUE1
						and TRUE does not equal VALUE1
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>TRUE<font class="structure"> != </font>VALUE1<font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font><font class="structure">(</font><font class="keyword3">constant </font><font class="type">boolean </font>FALSE1<font class="structure"> = </font><font class="value">false</font><font class="structure">)</font><font class="structure"> == </font>VALUE1<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT6<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT6"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Integer comparison
			Notes	: None
			Result	: Should be TRUE since 5i equals VALUE2 and 10i is more than VALUE2
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>5i<font class="structure"> == </font><font class="structure">(</font><font class="type">integer</font> VALUE2<font class="structure"> = </font><font class="value">5</font><font class="structure">)</font><font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font>10i<font class="structure"> &gt;= </font>VALUE2<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT7<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT7"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Integer comparison
			Notes	: None
			Result	: Should be FALSE since ZERO does not equal VALUE2
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font>ZERO<font class="structure"> == </font>VALUE2<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT8"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT8<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: InstanceOf test
			Notes	: None
			Result	: Should be TRUE since EXCP and VALUE3 are both exceptions..
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font>EXCP<font class="keyword2"> instance of </font><font class="structure">(</font><font class="type">exception</font> VALUE3<font class="structure"> = </font><font class="keyword2">new </font><font class="type">exception</font><font class="structure">(</font><font class="string">"Test exception from XML"</font><font class="structure">)</font><font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT9<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT9"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: "Not" test 
			Notes	: None
			Result	: Should be TRUE
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">not </font><font class="structure">(</font>STORED_FALSE<font class="structure"> == </font>STORED_TRUE<font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font>STORED_TRUE<font class="structure"> == </font>STORED_FALSE<font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font>STORED_FALSE<font class="structure"> == </font>STORED_FALSE<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT10<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT10"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: ElseIf test 
			Notes	: None
			Result	: Should be TRUE
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font>STORED_TRUE<font class="structure"> == </font>STORED_FALSE<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT11"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">elseif </font><font class="structure">(</font>STORED_FALSE<font class="structure"> == </font>STORED_FALSE<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT11<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT11"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Between test 2
			Notes	: Between is transformed into (leftId LessThan{EqualTo} valueId) And (valueIdLessThan{EqualTo} rightId)
			Result	: Should be TRUE since 0 and 10 are between 0 and 10 - when bounds are included
					  and 5 is between 0 and 10 even if bounds are excluded
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>ZERO<font class="structure"> between [</font>ZERO<font class="structure"> and </font>10i<font class="structure">] )</font><font class="structure"><br>and </font><font class="structure">(</font>5i<font class="structure"> between ]</font>ZERO<font class="structure"> and </font>10i<font class="structure">[ )</font><font class="structure"><br>and </font><font class="structure">(</font>10i<font class="structure"> between [</font>ZERO<font class="structure"> and </font>10i<font class="structure">] )</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT12<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT12"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Between test 2
			Notes	: None
			Result	: Should be FALSE since 0 and 10 are not between 0 and 10 - when bounds are excluded
		<br> */</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>ZERO<font class="structure"> between ]</font>ZERO<font class="structure"> and </font>10i<font class="structure">] )</font><font class="structure"><br>or </font><font class="structure">(</font>10i<font class="structure"> between [</font>ZERO<font class="structure"> and </font>10i<font class="structure">[ )</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT13"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT13<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: In test
			Notes	: In is transformed into (valueId Equals idList[0]) Or (valueId Equals idList[1]) ...
			Result	: Should be TRUE
		<br> */</font><br><br><font class="comment">/* <br> Avoid doing the following as the Integer will be asserted 3 times, one time for each member in the idList enumeration <br> */</font><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font>5i<font class="structure"> in (</font>5i<font class="structure">, </font>10i<font class="structure">)</font><font class="structure"><br>and </font><font class="structure">(</font>5i<font class="structure"> in (</font>ZERO<font class="structure">, </font>10i<font class="structure">, </font><font class="structure">(</font><font class="type">integer</font> NewValue<font class="structure"> = </font><font class="value">5</font><font class="structure">)</font><font class="structure">)</font><font class="structure"><br>and </font><font class="structure">not </font><font class="structure">(</font><font class="structure">(</font><font class="type">integer</font> 0K<font class="structure"> = </font><font class="value">-273</font><font class="structure">)</font><font class="structure"> in (</font>ZERO<font class="structure">, </font>5i<font class="structure">, </font>10i<font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT14<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT14"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: IsAsserted test
			Notes	: 
			Result	: Should be TRUE
		<br> */</font><br><font class="type">string</font> testAssert<font class="structure"> = </font><font class="string">"probe"</font><font class="structure">;</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font><font class="id">testAssert</font><font class="structure"> != </font><font class="constant">null</font><font class="structure">)</font><font class="structure"><br>and </font><font class="structure">not </font><font class="structure">(</font><font class="id">turnip</font><font class="structure"> != </font><font class="constant">null</font><font class="structure">)</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT15<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT15"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Retract test
			Notes	: 
			Result	: Should be TRUE
		<br> */</font><br><font class="id">testAssert</font><font class="structure"> = </font><font class="constant">null</font><font class="structure">;</font><br><br><font class="keyword">if </font><font class="structure">not </font><font class="structure">(</font><font class="id">testAssert</font><font class="structure"> != </font><font class="constant">null</font><font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT16<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT16"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Static rule set invocation
			Result	: Should process all global rules and the ones in the set named REFLECTION
			Notes	: None
		<br> */</font><br><font class="keyword2">invoke set</font><font class="structure">(</font><font class="id"><a href="#SET_REFLECTION">REFLECTION</a></font><font class="structure">);</font><br><font class="comment">/* <br>
			Tests	: Dyamic rule set invocation
			Result	: Should invoke the set whose Id is TestObject2.ToString().			
			Notes	: Of course, this works also with asserted String objects!
		<br> */</font><br><font class="keyword2">invoke set</font><font class="structure">(</font>TestObject2<font class="structure">);</font><br><font class="comment">/* <br>
			Tests	: Exceptions 3
			Notes	: As said before, the engine does not break on exception: it is up to the user to stop its processing.
					In the test handler, we have decided to break the execution for fatal exceptions, therefore FATEX should never be asserted.
			Result	: Immediatly throws an exception and stop processing the rule file.
		<br> */</font><br><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"This is a fatal exception!"</font>)<font class="structure">;</font><br><font class="comment">/* <br> The following will never be processed <br> */</font><br><font class="keyword3">constant </font><font class="type">boolean </font>FATEX<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"WORKINGSET finished"</font><font class="structure">);</font><br></ul><font class="structure"> }</font><br><br><font class="comment">/* <br>
		Tests	: This to check that globals are correctly processed
	<br> */</font><br><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">GlobalCounter</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
		Tests	: Reflection Test Set
		Notes	: None
		Result	: Should access and alter TestObject
	<br> */</font><br><a name="SET_REFLECTION"><font class="keyword">set </font><font class="id">REFLECTION</font></a><font class="structure"> {</font><ul><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"REFLECTION running"</font><font class="structure">);</font><br><font class="keyword3">constant </font><font class="type">boolean </font>REFLECTION<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: IsNull Test
			Notes	: InstanceOf returns false if the tested value is null
			Result	: Should be TRUE
		<br> */</font><br><font class="type">object</font> TestObject_Null<font class="structure"> = </font>TestObject.GetNull<font class="structure">;</font><br><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font><font class="type">object</font> Null_Check<font class="structure"> = </font>org.nxbre.util.Reflection.<font class="id">IsNull</font><font class="structure">(</font>TestObject_Null<font class="structure">)</font><font class="structure">)</font><font class="structure"> == </font>TRUE<font class="structure">)</font><br><font class="structure">{</font><ul><font class="keyword3">constant </font><font class="type">boolean </font>LT17<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"LT17"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="comment">/* <br>
			Tests	: Multi-signature Property access (like Item)
			Notes   : These tests have been added to help pinpoint bug 918864
			Result	: Context object Hashtable_Value should contain TestHashtable["two"]
					  Context object TestHashtable should be updated like this TestHashtable["four"]="forth"
		<br> */</font><br><font class="type">object</font> Hashtable_Value<font class="structure"> = </font>TestHashtable.<font class="id">Item</font><font class="structure">(</font><font class="string">"two"</font><font class="structure">)</font><font class="structure">;</font><br>TestHashtable.<font class="id">Item</font><font class="structure">(</font><font class="string">"four"</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="string">"forth"</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: RowSet Manipulation Access
			Notes	: It is possible to access row sets through pure reflection, this demonstrate how to use the simple
							helper methods in NxBRE v2
			Result	: Context object TestRowSet_Col1 should contain TestRowSet["col1"]
					  Context object TestRowSet should be updated like this TestRowSet["col2"]=1969
		<br> */</font><br><font class="type">object</font> TestRowSet_Col1<font class="structure"> = </font>org.nxbre.util.DataAccess.<font class="id">GetDataRowColumnValue</font><font class="structure">(</font>TestRowSet<font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="string">"col1"</font><font class="structure">)</font><font class="structure">;</font><br>org.nxbre.util.DataAccess.<font class="id">SetDataRowColumnValue</font><font class="structure">(</font>TestRowSet<font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="string">"col2"</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">1969</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: Methods with Params Argument Access
			Notes	: NxBRE v2 can directly access methods with one argument being a param array,
			or if the param array is of a different type for the type just before
			Result	: Context object TestMultiply should contain 2 * 5 * 9 = 90
								Context object TestOperate1 should contain 0.5 * 4 * 7 = 14d
		<br> */</font><br><font class="type">object</font> TestMultiply<font class="structure"> = </font>org.nxbre.util.Maths.<font class="id">Multiply</font><font class="structure">(</font><font class="value">2</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">5</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">9</font><font class="structure">)</font><font class="structure">;</font><br><font class="type">object</font> TestOperate1<font class="structure"> = </font>org.nxbre.test.TestObject.<font class="id">Operate1</font><font class="structure">(</font><font class="value">0.5</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">4</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">7</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: Methods with Params Argument Access
			Notes	: For methods with a parameter followed by a param array of same type, the params must be wrapped in an array
			Result	: Context object TestOperate2 should contain -3 + (4 * 7) = 25
		<br> */</font><br><font class="type">object</font> Temp_TestOperate2<font class="structure"> = </font>org.nxbre.util.Parameter.<font class="id">ToArray</font><font class="structure">(</font><font class="value">4</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">7</font><font class="structure">)</font><font class="structure">;</font><br><font class="type">object</font> TestOperate2<font class="structure"> = </font>org.nxbre.test.TestObject.<font class="id">Operate2</font><font class="structure">(</font><font class="value">-3</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>Temp_TestOperate2<font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
			Tests	: Advanced Reflection Tests
		<br> */</font><br><br><font class="comment">/* <br> Compares an object field with a loaded value. <br> */</font><br><font class="keyword">if </font><font class="structure">(</font><font class="structure">(</font><font class="type">object</font> TestObject_MyField<font class="structure"> = </font>TestObject.MyField<font class="structure">)</font><font class="structure"> == </font>TRUE<font class="structure">)</font><br><font class="structure">{</font><ul><font class="comment">/* <br> Places an object property in the context. <br> */</font><br><font class="type">object</font> TestObject_MyProperty<font class="structure"> = </font>TestObject.MyProperty<font class="structure">;</font><br><font class="comment">/* <br> Calls a static method with expressions and values coming from the context
					     and places the result in the context.
						The method will be searched using the arguments' types.
						Remember that using the "value" attribute gives a String type, unless you specify a type argument.
						If you use "ruleValue", then the type will be of the asserted's object type.
					     The Assembly name can be given after the coma.  <br> */</font><br><font class="type">object</font> TestObject_NewProperty<font class="structure"> = </font>org.nxbre.test.TestObject.<font class="id">Add</font><font class="structure">(</font>10i<font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>TestObject_MyProperty<font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br> Sets a property on an object available in the context. <br> */</font><br>TestObject.<font class="id">MyProperty</font><font class="structure">(</font>TestObject_NewProperty<font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br> Sets a field on an object available in the context. <br> */</font><br>TestObject.<font class="id">MyField</font><font class="structure">(</font>STORED_FALSE<font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br> Instantiates a new TestObject in the context
						As for methods calls, the constructor used is selected using the arguments' types. <br> */</font><br><font class="type">object</font> TestObject2<font class="structure"> = </font><font class="keyword2">new </font><font class="privatetype">org.nxbre.test.TestObject</font><font class="structure">(</font>STORED_TRUE<font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="value">99</font><font class="structure">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font class="string">"world"</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br> Calls a method on TestObject. The method is void, therefore the Id does not matter <br> */</font><br>TestObject.<font class="id">InheritMethod</font><font class="structure">(</font>TestObject2<font class="structure">)</font><font class="structure">;</font><br></ul><font class="structure">}</font><br><font class="keyword">else</font><br><font class="structure">{</font><ul><font class="keyword2">throw </font><font class="keyword2"> new </font><font class="id">BREFatalException</font>(<font class="string">"REFLECTION"</font>)<font class="structure">;</font><br></ul><font class="structure">}</font><br><br><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"REFLECTION finished"</font><font class="structure">);</font><br></ul><font class="structure"> }</font><br><br><font class="comment">/* <br>
		Tests	: This to check that globals are correctly processed
	<br> */</font><br><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">GlobalCounter</font><font class="structure">)</font><font class="structure">;</font><br><font class="comment">/* <br>
		Tests	: Another Test Set
		Notes	: None
	<br> */</font><br><a name="SET_ANOTHER"><font class="keyword">set </font><font class="id">ANOTHER</font></a><font class="structure"> {</font><ul><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"ANOTHER running"</font><font class="structure">);</font><br><font class="keyword3">constant </font><font class="type">boolean </font>ANOTHER<font class="structure"> = </font><font class="value">true</font><font class="structure">;</font><br><font class="keyword2">log</font><font class="structure">(</font><font class="value">5</font><font class="structure">, </font><font class="string">"ANOTHER finished"</font><font class="structure">);</font><br></ul><font class="structure"> }</font><br><br><font class="comment">/* <br>
		Tests	: This to check that globals are correctly processed
	<br> */</font><br><font class="keyword2">evaluate</font><font class="structure">(</font><font class="id">GlobalCounter</font><font class="structure">)</font><font class="structure">;</font><br><a name="RULES_BOTTOM"></a></font>
  </body>
</html>